home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.07 Jul 90 / Commando Programming ƒ / Rezscripts / RezC.DLOG < prev    next >
Encoding:
Text File  |  1989-08-09  |  1.6 KB  |  85 lines  |  [TEXT/MPS ]

  1. ###    File RezC.DLOG
  2. ### Generate Rez input for DLOG Resources
  3. ### W. Powell    1988
  4.  
  5. Set Exit 0
  6. Set rid {1}
  7. Shift 1
  8. Echo -n "Resource ∂'DLOG∂' ({rid}"
  9. If "{1}" == "-nms"
  10.     Set rname "{2}"
  11.     If ("{rname}" != "")
  12.         Echo -n ,∂""{rname}"∂"
  13.     End
  14.     Shift 2
  15. End
  16. If "{1}" == "-t"
  17.     Set tr {2}
  18.     Shift 2
  19. Else
  20.     Echo "### {0} Error: Rectangle args out of order">>Dev:StdErr
  21.     Exit 1
  22. End
  23. If "{1}" == "-l"
  24.     Set lr {2}
  25.     Shift 2
  26. Else
  27.     Echo "### {0} Error: Rectangle args out of order">>Dev:StdErr
  28.     Exit 1
  29. End
  30. If "{1}" == "-b"
  31.     Set br {2}
  32.     Shift 2
  33. Else
  34.     Echo "### {0} Error: Rectangle args out of order">>Dev:StdErr
  35.     Exit 1
  36. End
  37. If "{1}" == "-r"
  38.     Set rr {2}
  39.     Shift 2
  40. Else
  41.     Echo "### {0} Error: Rectangle args out of order">>Dev:StdErr
  42.     Exit 1
  43. End
  44. Set Vis "{1}"
  45. Set DITL {2}
  46. Shift 2
  47. If "{1}" == "-const"
  48.     Set RefCon "{2}"
  49.     Shift 2
  50. Else
  51.     Set RefCon 0
  52. End
  53. If "{1}" == "-title"
  54.     Set Label "{2}"
  55.     Shift 2
  56. Else
  57.     Set Label ""
  58. End
  59.  
  60. If ( "{1}" == "-sy" ) ; Echo -n ",SysHeap" ; Shift ; End
  61. If ( "{1}" == "-pu" ) ; Echo -n ",Purgeable" ; Shift ; End
  62. If ( "{1}" == "-lo" ) ; Echo -n ",Locked" ; Shift ; End
  63. If ( "{1}" == "-Pr" ) ; Echo -n ",Protected" ; Shift ; End
  64. If ( "{1}" == "-PL" ) ; Echo -n ",PreLoad" ; Shift ; End
  65. Echo ") ∂{"
  66. Set ProcID "{1}"
  67. Set CloseOp "{2}"
  68.  
  69. Echo "∂t∂{{tr},{lr},{br},{rr}∂},∂t∂t∂/* Bounds Rect *∂/"
  70. Echo "∂t{ProcID},∂t∂t∂/* Window Proc *∂/"
  71. If "{Vis}" == "-I"
  72.     Echo "∂tinvisible,"
  73. Else
  74.     Echo "∂tvisible,"
  75. End
  76. If "{CloseOp}" == "-goAway"
  77.     Echo "∂tgoAway,"
  78. Else
  79.     Echo "∂tnoGoAway,"
  80. End
  81. Echo "∂t{RefCon},∂t∂t∂/* RefCon *∂/"
  82. Echo "∂t{DITL},∂t∂t∂/* DITL Resource ID *∂/"
  83. Echo "∂t∂"{Label}∂"∂t"
  84. Echo "∂};"
  85. Exit 0